package cn.owng.server.platform.model.http.request;

import cn.owng.server.common.validation.constraints.Option;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.*;

/**
 * 微信公众号请关注: 开源螺丝钉
 * <br>
 * 码云请关注: <a href="https://gitee.com/xiyoufang">https://gitee.com/xiyoufang</a>
 * <br>
 * 哔哩哔哩请关注: <a href="https://space.bilibili.com/438927834">https://space.bilibili.com/438927834</a>
 *
 * @author xiyoufang
 */
@Setter
@Getter
@Accessors(chain = true)
public class GameGameSaveOrUpdateReq {
    /**
     * Game ID
     */
    private Long gameId;
    /**
     * Game Code
     */
    @Size(min = 1, max = 64)
    @NotEmpty
    private String code;
    /**
     * Game Name
     */
    @Size(min = 1, max = 128)
    @NotEmpty
    private String name;
    /**
     * Game Description
     */
    @Size(max = 1024)
    private String description;
    /**
     * Game Banner
     */
    @URL
    @NotEmpty
    @Size(max = 512)
    private String banner;
    /**
     * Game Icon
     */
    @URL
    @NotEmpty
    @Size(max = 512)
    private String icon;
    /**
     * Game Deployment
     */
    @URL
    @Size(max = 512)
    private String deployment;
    /**
     * Game Sort Order
     */
    @NotNull
    @DecimalMin("0")
    @DecimalMax("9999")
    private String sortOrder;

    /**
     * Game Status
     */
    @NotNull
    @Option(message = "无效状态", options = {"0", "1"})
    private String status;
}
